-
Notifications
You must be signed in to change notification settings - Fork 19
Added Rotation.kt to Hud and Yaw locking in ElytraFly.kt #224
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 1.21.11
Are you sure you want to change the base?
Conversation
| import com.lambda.module.tag.ModuleTag | ||
| import com.lambda.threading.runSafe | ||
|
|
||
| object Rotation : HudModule ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make sure to follow the codebase's styling. Don't put a space between the class and the constructor arguments
| runSafe { | ||
| val yaw = player.yaw | ||
| val pitch = player.pitch | ||
| val text = "($yaw, $pitch)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're gonna have to add a FormatterSettings that has all of its category hidden except the number formatting for this. Refer to the Coordinate hud module and the Formatting object to serialize tuples correctly.
|
@Jalvaviel here's what I had in mind. private val formatter = FormatterSettings(this).apply {
applyEdits {
::timeFormat.edit { hide() }
}
}
override fun ImGuiBuilder.buildLayout() {
runSafe {
val rotation = player.rotationClient.format(formatter)
textCopyable(rotation)
}
} |
Feat: Added Rotation as a Hud element and yaw locking for ElytraFlyDescription
Addresses the last two suggestions by @beanbag44
Checklist Before Submitting
To ensure the quality and maintainability of your PR, confirm the following before submission: